import React, {Component} from 'react';

import JoinTab from './JoinTab';
import FromMeTab from './FromMeTab';

export default class Activity extends Component {
  constructor(props) {
    super(props);
  }

  renderContent(url) {
    if (url == '/activity/me') {
      return (
        <FromMeTab
          token={this.props.token}
          userId={this.props.userId}
          color500={this.props.color500}
          pushTo={this.props.pushTo}
          isSmallViewport={this.props.isSmallViewport}
        />
      );
    } else {
      return (
        <JoinTab
          token={this.props.token}
          userId={this.props.userId}
          color500={this.props.color500}
          pushTo={this.props.pushTo}
          isSmallViewport={this.props.isSmallViewport}
        />
      );
    }
  }
  
  render() {
  	return (
      <div>
        {this.renderContent(this.props.url)}
      </div>
  	);
  }
};